package com.mera.tektronix.csviewer.domain

import com.mera.tektronix.csviewer.jmx.Sorted

class Department {

	@Sorted Long id
	@Sorted String name
	String email
	String phone

	static hasMany = [projects : Project]
	static belongsTo = [company: Company]
	
    static constraints = {
		name(blank:false, unique:true)
		email(email:true)
		phone(blank: true, matches : /^\d{3}-\d{2}-\d{2}(#\d{4})?$/)
    }
}
